<link href="<?php echo URLPRE;?>static/admin/css/admin_full.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/jquery/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/js/jquery/jquery.form.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/validate/jquery.validate.1.9.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/validate/jquery.metadata.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/validate/messages_cn.js"></script>
<link href="<?php echo URLPRE;?>static/public/Lib/artDialog/skins/default.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/artDialog/jquery.artDialog.source.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript" src="<?php echo URLPRE;?>static/admin/js/common.js?newversion"></script>
<link href="<?php echo URLPRE;?>static/public/css/common.css" rel="stylesheet" type="text/css" />
<link href="<?php echo URLPRE;?>static/admin/css/font_icon.css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo URLPRE;?>static/public/Lib/Kalendajs/build/kalendae.standalone.js"></script>
<link href="<?php echo URLPRE;?>static/public/Lib/Kalendajs/build/kalendae.css" rel="stylesheet" />
<style>
    .input{ height: 28px;}
</style>
<form method="post" action="<?php echo $index_url?>">
    <div class="table_list" id="content">
        <table width="100%">
            <tbody>
            <tr>
                <td>
                    关键字：<input type="text" value="<?php echo $condition['keywords']?>" placeholder="电话/线路名称" name="keywords" class="input rounded" size="20" />&nbsp;&nbsp;
                    处理状态：<select name="status">
                        <option value="-1" <?php if($condition['status']==-1)echo 'selected'?>>全部</option>
                        <option value="0" <?php if($condition['status']==0)echo 'selected'?>>未处理</option>
                        <option value="1" <?php if($condition['status']==1)echo 'selected'?>>已处理</option>
                    </select>
                    预定时间：<input type="text" value="<?php echo $condition['start_date']?>" placeholder="开始时间" class="input rounded" name="start_date" id="Kalendae" />
                    - <input type="text" value="<?php echo $condition['end_date']?>" placeholder="结束时间" class="input rounded" name="end_date" id="Kalendae2" />
                    &nbsp;&nbsp;<input type="submit" class="btn" value="搜索">
                </td>
            </tr>
            </tbody>
        </table>
        <table width="100%">
            <col width="50px"/>
            <col width="200px"/>
            <col width="180px"/>
            <col width="200px"/>
            <col width="250px"/>
            <col/>
            <col width="80px"/>
            <tr>
                <td>序号</td>
                <td>线路名称</td>
                <td>联系人电话</td>
                <td>预定时间</td>
                <td>处理状态/时间</td>
                <td>备注</td>
                <td>操作</td>
            </tr>
            <?php if($list):?>
                <tbody>
                <?php foreach($list as $key=>$val):?>
                    <tr>
                        <td><?php echo $key+1;?></td>
                        <td><a href="<?php echo site_url("xianlu/".$val['line_id'].'.html')?>" target="_blank"><?php echo $val['line_name'];?></a></td>
                        <td><?php echo $val['tel'];?></td>
                        <td><?php echo $val['add_time'];?></td>
                        <td><?php echo $val['status']?'已处理&nbsp;'.$val['up_time']:'未处理';?></td>
                        <td><?php echo $val['remark'];?></td>
                        <td><?php if($val['status']==0):?>
                            <a href="<?php echo site_url('weixin/worder/edit_tel/'.$val['id'])?>">处理</a>
                            <?php endif;?>
                        </td>
                    </tr>
                <?php endforeach;?>
                </tbody>
            <?php endif;?>
        </table>
    </div>
</form>
<div class="page_nav">
    <?php echo $this->mypageclass->show(2); ?>
</div>

<script type="text/javascript">
    $(function(){

        var kal_dae = new Kalendae.Input('Kalendae', {
            months:1,
            mode:'single',
            format:'YYYY-MM-DD',
        });
        var kal_dae2 = new Kalendae.Input('Kalendae2', {
            months:1,
            mode:'single',
            format:'YYYY-MM-DD',
        });

        //操作订单状态
        $(".operation").click(function(){
            var data_uri = $(this).attr('data-uri');
            var that = $(this, window.top.document);
            var title = $(this).attr('title');
            $.dialog.load(data_uri,{
                title:title+'订单',
                padding:'',
                resize: false,
                drag: false,
                width:'60%',
                fixed: true,
                zIndex:'100'
            });
        });
    })
</script>